import React from 'react';
import { View, Text, TouchableOpacity, Platform } from 'react-native';
import moment from 'moment'
import navigationhelper from 'src/components/navigationhelper'
import {CalendarList, LocaleConfig} from 'react-native-calendars';
import NavBar from 'src/components/navBar'
import Layer from 'src/components/Layer'
import {isIPhoneX} from 'src/util'
import ScrollableTabView from 'react-native-scrollable-tab-view'
import CreditCardList from './components/creditCardList'
import { deviceWidth } from '../../../util';


export default class cardManagerHomePage extends React.Component {

    constructor(props) {
      super(props);

      this.state = {
        dataArray:[]
      }
    }
    onConfirmSelectedDay = () => {
      
    }

    render(){
      return(
        <View style={{flex: 1}}>
        <NavBar 
          back={()=>{navigationhelper.goBack() }} 
          title={'卡片管理'} 
          leftText={'返回'} 
        //   rightButton={<TouchableOpacity
        //     style={{justifyContent:'center', paddingRight: 15, alignItems: 'center', paddingTop: Platform.OS === 'ios' ? (isIPhoneX() ? 30: 10) : 0}}
        //     onPress={this.onConfirmSelectedDay}
        //   >
        //     <Text style={{fontSize: 16, color: '#378EFB', fontFamily: 'PingFang SC'}}>
        //       {'确定'}
        //     </Text>
        //   </TouchableOpacity>}
        />

       <ScrollableTabView
                tabBarBackgroundColor={'#fff'}
                tabBarStyle={{height: 40}}
                tabBarActiveTextColor={'#ff2121'}
                tabBarInactiveTextColor={'#2e2e2e'}
                tabBarTextStyle={{ fontSize: 14, paddingTop: 6 }}
                tabBarUnderlineStyle={{
                    justifyContent:'center',
                    alignItems: 'center',
                    width: 50,
                    height: 3,
                    borderRadius: 1.5,
                    backgroundColor: '#ff2121',
                    marginLeft: deviceWidth*0.18
                }}>

            <CreditCardList tabLabel={'信用卡'} typeCard ={1} type= {'02'}/>
            <CreditCardList tabLabel={'储蓄卡'} typeCard ={2} type= {'00'}/>
            </ScrollableTabView>
     </View>
      ) 
    }

}